<template>
  <span style="position: relative;right: -120px;">
    <a @mouseenter="hanlderMouseEnter" href="javascript:"><i class="el-icon-link"></i>上传附件</a>
    <ul @mouseleave="showLink = false" class="link-box" v-show="showLink">
      <li>本地</li>
      <li>远程</li>
    </ul>
    <span>单据编号：xxxxxx <i class="el-icon-edit"></i></span>
  </span>
</template>

<script>
export default {
  name: 'PublicLink',
  data() {
    return {
      showLink: false
    }
  },
  methods: {
    hanlderMouseEnter() {
      this.showLink = true
    },

  }
}
</script>

<style scoped>
a {
  margin-right: 30px;
  color: #66b1ff;
  font-size: 14px;
}

.link-box {
  width: 80px;
  height: 60px;
  background-color: #409eff;
  color: white;
  position: absolute;
  right: 140px;
  top: 20px;
  z-index: 10;
  padding: 0;
  text-align: center;
}

.link-box li {
  list-style: none;
  line-height: 30px;
  height: 30px;
}

li:hover {
  background-color: gray;
}
</style>